package org.shuma.goods.controller;

import org.shuma.goods.commons.Result;
import org.shuma.goods.service.ProductDetailsInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/goods")
public class ProductDetailsInfoController {
    @Autowired
    private ProductDetailsInfoService productDetailsInfoService;
    @GetMapping("/detail")
    public Result getProductDetailsInfo(@RequestParam("productId") Integer productId) {
        return Result.success(productDetailsInfoService.getProductDetailsInfo(productId));
    }
}
